home *** CD-ROM | disk | FTP | other *** search
/ Acorn Risc Technologies StrongARM CD-ROM / Acorn Risc Technologies StrongARM CD-ROM.iso / ftp / documents / appnotes / 231_245 / 244c / Text
Encoding:
Text File  |  1993-11-25  |  5.3 KB  |  154 lines

  1. -----------------------------------------------------------------------------
  2. 9th March 1992
  3. -----------------------------------------------------------------------------
  4. Support Group Application Note Disabling relocatable modules and other
  5. resources in RISC OS.
  6. Number: 244
  7. Issue:  1.0
  8. Author: CAS
  9. -----------------------------------------------------------------------------
  10.  
  11. Developer's Notes: 
  12.  
  13.  This application note will detail a method which will ensure that RISC OS
  14. based Relocatable Modules and other resources such as !Configure, are
  15. disabled during a machines boot sequence.
  16.  
  17.  
  18. -----------------------------------------------------------------------------
  19. Applicable Hardware: All Archimedes
  20.  
  21. Related Application Notes:    None
  22.  
  23.  
  24. -----------------------------------------------------------------------------
  25. Copyright (C) Acorn Computers Limited 1992
  26.  
  27. Every effort has been made to ensure that the information in this leaflet is 
  28. true and correct at the time of printing. However, the products described in
  29. this leaflet are subject to continuous development and improvements and
  30. Acorn Computers Limited reserves the right to change its specifications at
  31. any time. Acorn Computers Limited cannot accept liability for any loss or
  32. damage arising from the use of any information or particulars in this
  33. leaflet. ACORN, ECONET and ARCHIMEDES are trademarks of Acorn Computers
  34. Limited.
  35. -----------------------------------------------------------------------------
  36. Support Group
  37. Acorn Computers Limited
  38. Acorn House
  39. Vision Park
  40. Histon
  41. Cambridge
  42. CB4 4AE                                                  
  43. -----------------------------------------------------------------------------
  44.  
  45. Introduction
  46.  
  47.  Some of the applications and relocatable modules which are an integral part
  48. of RISC OS 3 can in some circumstances, prove a distraction in a classroom
  49. situation.
  50.  
  51.  This application note will detail how to correctly disable such resources
  52. with specific reference to :
  53.  
  54. !Configure 
  55. !Alarm 
  56. Broadcast loader
  57.  
  58. Disabling Relocatable Modules.
  59.  
  60.  A relocatable module can be disabled in one of two ways: temporarily or
  61. "permanently".
  62.  
  63.  Modules which are temporarily disabled will remain so until the machine is
  64. switched off. When the machine is switched on again the modules are once
  65. again initialised for use.
  66.    Modules which are "permanently" disabled will remain so until the machine
  67. is reset via a Delete-Power On. They will remain disabled even if the
  68. machine is switched off and on again. 
  69.  
  70.  Note:Whilst this process is deemed to be permanent, a knowledgeable user
  71. can easily overcome this mechanism. It will, however, keep the less
  72. experienced "twiddler" at bay.
  73.  
  74.  The routines for disabling relocatable modules are inserted at the start of
  75. the !Boot or !ArmBoot file which is to be run when the machine is first
  76. switched on.
  77.  
  78. T he following sequence demonstrates how !Configure can be temporarily
  79. disabled.
  80.  
  81. *RMKill !Configure
  82.  
  83.   !Configure can be "permanently" disabled through the use of the following
  84. command:
  85.  
  86. *Unplug !Configure
  87.  
  88.  Problems occur if this latter command is placed in a boot sequence. The
  89. first time the sequence is run the command will be executed and the module
  90. unplugged. The second time the module will already be unplugged and hence
  91. not "present" in the machine. The command will then report:
  92.  
  93.     Module !Configure not found
  94.  
  95. and the boot sequence will stop.
  96.  
  97. A more robust mechanism, as illustrated below, overcomes this problem:
  98.  
  99. SetEval Configure$Module 1
  100. RMEnsure !Configure 0 SetEval Configure$Module 0
  101. If Configure$Module=1 Then Unplug !Configure
  102. Unset Configure$Module
  103.  
  104.  
  105.  
  106.  It works by setting a flag, in this case Configure$Module, which is then
  107. altered according to a series of tests. The end result is then used to
  108. decide if the module is present and therefore needs to be unplugged or not.
  109.  
  110. Taking this sequence a line at a time:
  111.  
  112. SetEval Configure$Module 1           | Set the flag to 1
  113.  
  114. RMEnsure !Configure 0 SetEval Configure$Module 0 | Check if the Module is
  115. there. If it is NOT then  | set the flag to 0
  116.  
  117. If Configure$Module=1 Then Unplug !Configure| If its there then *Unplug it
  118.  
  119. Unset Configure$Module | Remove the flag from memory
  120.  
  121.  The same procedure can be applied to other ROM based applications such as
  122. !Alarm:
  123.  
  124. SetEval Alarm$Module 1
  125. RMEnsure !Alarm 0 SetEval Alarm$Module 0
  126. If Alarm$Module=1 Then Unplug !Alarm
  127. Unset Alarm$Module
  128.  
  129. W ith Ethernet based networks the Broadcast Loader can impair the
  130. performance of the network due to the mechanisms which it uses. It is
  131. therefore strongly recommended that the Broadcast Loader is disabled. The
  132. following sequence shows how to achieve this:
  133.  
  134. SetEval BLoader$Module 1
  135. RMEnsure BroadcastLoader 0 SetEval BLoader$Module 0
  136.  If BLoader$Module Then RMEnsure EconetA 0 SetEval BLoader$Module
  137. <BLoader$Module>+1 | No broadcast loader -> 0 | BLoader and EconetA -> 1 |
  138. BLoader not EconetA -> 2 If BLoader$Module=2 Then Unplug BroadcastLoader
  139. Unset BLoader$Module
  140.  
  141. Note:This sequence will not disable the Broadcast Loader if the Archimedes
  142. is running native Econet.
  143.  
  144. Re-Enabling disabled relocatable modules.
  145.  
  146.  To re-enable these resources you should simply issue an *RMReinit <Module
  147. name> as shown below:
  148.  
  149. *RMReinit !Configure
  150. *RMReinit !Alarm
  151. *RMReinit BroadcastLoader
  152.  
  153.  In the case of !Configure, !Alarm and other similar resources, once the
  154. module has been RMReinited you should Ctrl-Reset the machine.